{extends file="backend/index.tpl"} 

{block name="page-content"} 
<form id="validate" action="{$base_url}admin/image/updateImage" method="post" enctype="multipart/form-data">
<div class="row-fluid">
	<div class="span6">
		<div class="block">
			<div class="head">
				<h2>Update Image</h2>
				<ul class="buttons">
					<li><a href="#" onClick="source('form_validation'); return false;">
							<div class="icon">
								<span class="ico-info"></span>
							</div> </a>
					</li>
				</ul>
			</div>
			<div class="data-fluid">
				<input type="hidden" class="validate[required]" name="id" value="{$image.id}" />
				<div class="row-form">
                    <div class="span3">File Name</div>
                    <div class="span9">
                        <div class="input-append file" style="width: 300px;">
                            <input type="file" name="filename" style="width: 298px;"/>
                            <input type="text" name="filename" value="{$image.filename}"/>
                            <span class="btn">Browse</span>
                        </div>
                        <img src="{$root_url}public/frontend/hinh-anh/{{$image.filename}}" />
                    </div>
                </div>
				<div class="row-form">
					<div class="span3">Title</div>
					<div class="span9">
						<input type="text" id="title" name="title"  value="{$image.title}"/>
					</div>
				</div>	
				<div class="row-form">
					<div class="span3">Width</div>
					<div class="span9">
						<input name="width" type="text" value="{$image.width}"/>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="span6">
		<div class="block">
			<div class="head">
				<h2></h2>
				<ul class="buttons">
					<li><a href="#" onClick="source('form_validation'); return false;">
							<div class="icon">
								<span class="ico-info"></span>
							</div> </a>
					</li>
				</ul>
			</div>
			<div class="data-fluid">
				<div class="row-form">
					<div class="span3">Type</div>
					<div class="span9">
						<select name="type" class="select" style="width: 100%;">
								<option value="O" {if $image.type eq 'O'}Selected{/if}>O</option>
								<option value="SS" {if $image.type eq 'SS'}Selected{/if}>SS</option>
								<option value="S" {if $image.type eq 'S'}Selected{/if}>S</option>
								<option value="M" {if $image.type eq 'M'}Selected{/if}>M</option>
								<option value="L" {if $image.type eq 'L'}Selected{/if}>L</option>
								<option value="LL" {if $image.type eq 'LL'}Selected{/if}>LL</option>
						</select>
					</div>
				</div>
				<div class="row-form">
					<div class="span3">Alt</div>
					<div class="span9">
						<input type="text" id="alt" name="alt"  value="{$image.alt}"/>
					</div>
				</div>	
				<div class="row-form">
					<div class="span3">Height</div>
					<div class="span9">
						<input name="height" type="text" value="{$image.height}"/>
					</div>
				</div>
				<div class="toolbar bottom tar">
					<div class="btn-group">
						<button class="btn btn-info" type="button"
							onClick="$('#validate').validationEngine('hide');">Hide prompts</button>
						<button class="btn" type="submit" name="submit" id="addImage">Update
								Image</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</form>

{/block}